/// 负责电脑端的窗口排布
part of '../launch.dart';

setupWindow() async {
  if (Platform.isMacOS) {
    // 在启动时，对窗口进行一些加工
    // 必须加上这一行。
    await windowManager.ensureInitialized();
    WindowOptions windowOptions = const WindowOptions(
      minimumSize: Size(500, 850),
    );
    windowManager.waitUntilReadyToShow(windowOptions, () async {
      await windowManager.setSize(const Size(500, 850));
      await windowManager.show();
      await windowManager.focus();
      // await windowManager.setOpacity(0.97);
      await windowManager.setTitleBarStyle(
        TitleBarStyle.hidden,
        windowButtonVisibility: false,
      );
    });
  }
}
